<% for column in Layer.content_columns %>
<p>
  <b><%= column.human_name %>:</b> <%=h @layer.send(column.name) %>
</p>
<% end %>

<table>
  <tr>
  <% for column in Component.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for component in @component_defs %>
  <tr>
  <% for column in Component.content_columns %>
    <td><%=h component.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => profile %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => profile %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => profile }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Add Component', :controller => 'layers', :action => 'add_component', :id => params[:layer_id] %>
<%= link_to 'Back', :controller => 'architectures', :action => 'show', :id => params[:architecture_id] %>
